<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html;charset=utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>生成订单 - 当当网</title>
<link href="../css/login.css" rel="stylesheet" type="text/css" />
<link href="../css/page_bottom.css" rel="stylesheet" type="text/css" />
<link href="../css/address.css" rel="stylesheet" type="text/css" />

</head>
<body>
	<%@include file="../common/head1.jsp"%>
	<div class="login_step">
		生成订单骤: 1.确认订单 ><span class="red_bold"> 2.填写送货地址</span> > 3.订单成功
	</div>
	<div class="fill_message">
		 
		 <form action="${pageContext.request.contextPath}/Order/Order_insertOrder" method="post">
			 <div class="address-wrap">
				<ul class="address-list">
					<c:forEach items="${list}" var="dd">
						<c:if test="${dd.deleState==0}">
					 <li class="">
						<div class="addressBox" hidden="hidden">
							<span class="marker-tip" >寄送至</span>
						</div>
						<label class="addressInfo">
							<c:if test="${dd.seleState==0}">
							<input type="radio" name="order.addrId" value="${dd.id}"  />
							</c:if>
							<c:if test="${dd.seleState==1}">
								<input type="radio" name="order.addrId" checked="checked" value="${dd.id}"/>
							</c:if>
							<span class="user-address">
								<span >${dd.adrs} </span>
								<span></span>
								<span>（</span>
								<span>${dd.recvName} </span>
								<span> 收）</span>
								<em>${dd. mobile}</em>
							</span>
						</label>
				</li>
						</c:if>
					</c:forEach>
				</ul>
			</div>
			
			<div class="login_in">
				<input
					id="btnClientRegister" class="button_1" name="submit" type="submit"
					value="下一步" />
			</div>
			
		</form>
	</div>
	<%@include file="../common/foot1.jsp"%>
	<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.11.1.js"></script>
<script type="text/javascript">
		$(":radio").click(function () {
			$(":radio").each(function () {
				console.log($(this).prop("checked"));
				if ($(this).prop("checked")){
					$(this).parent("label").parent("li").prop("class","address-wrap selected");
					$(this).parent("label").siblings("div").prop("hidden","");
					$(this).parent("label").parent("li").siblings().removeClass();
					$(this).parent("label").parent("li").siblings().children("div").prop("hidden","hidden");
				}
			});
		});

</script>
</body>
</html>

